//
//  BaseVC.h
//  OC_Poj_demo
//
//  Created by weixin on 2018/7/17.
//  Copyright © 2018年 weixn. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BaseContrastIconView.h"// 对比数量Icon
#import "BaseNavigationView.h"
#import "BaseVCNoneDataView.h"

typedef void(^EmptyCallback)(void);
typedef void(^HeaderRefreshBlock)(void);
typedef void(^FooterRefreshBlock)(void);

@interface BaseVC : UIViewController

/** 无数据显示View */
@property (nonatomic, strong) BaseVCNoneDataView *noneDataView;
/** 导航栏 */
@property (nonatomic, strong) BaseNavigationView *baseNavigationView;
/** 导航栏底部是否有阴影 */
@property (nonatomic, assign) BOOL navigationViewIsShowShadow;



/** 对比数量 */
@property (nonatomic, copy) BaseContrastIconView *contrastIconView;
/** 根据内容数量是否显示无数据背景图 */
- (void)showNoneDataViewWithFrame:(CGRect)frame title:(NSString *)title modelCount:(NSInteger)count;
/** 如果token 不一致删除数据*/
- (void)errorTokenHandleWithError:(NSError *)error vc:(BaseVC *)vc completion:(EmptyCallback)completion;



// 导航栏方法
/** 导航栏Title */
- (void)setNavigationTitle:(NSString *)title;
/** 导航栏 */
- (void)setNavigationBarHide;
/** 状态栏颜色 */
- (void)setStatusBar:(UIStatusBarStyle)style;
/** 导航栏按钮回调 */
- (void)leftButton1ClickWithButton:(UIButton *)button;
- (void)rightButton1ClickWithButton:(UIButton *)button;
- (void)rightButton2ClickWithButton:(UIButton *)button;

// Insets
- (void)setScrollViewInsets:(UIScrollView *)scrollView;

// 刷新控件
/** 添加下拉刷新 */
- (void)addHeaderRefreshWithScrollView:(UIScrollView *)scrollView refreshBlock:(HeaderRefreshBlock)refreshBlock;
/** 添加上拉刷新 */
- (void)addFooterRefreshWithScrollView:(UIScrollView *)scrollView refreshBlock:(FooterRefreshBlock)refreshBlock;
/** 添加上拉自动刷新 */
- (void)addAutoFooterRefreshWithScrollView:(UIScrollView *)scrollView refreshBlock:(FooterRefreshBlock)refreshBlock;
/** 停止刷新 */
- (void)endRefreshingWithScrollView:(UIScrollView *)scrollView;
/** 停止刷新 兼判断上拉没有更多数据 */
- (void)endRefreshingWithScrollView:(UIScrollView *)scrollView count:(NSInteger)count;
/** 置空当前的上下拉刷新 */
- (void)removeHeaderFooterRefreshWithScrollView:(UIScrollView *)scrollView;

/** 控制器释放 */
- (void)releaseNavigationControllerVCArray:(NSArray<Class> *)toBeReleaseVCArray;


@end
